home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / clue.lha / clue / doc / clue.tex / node119_mn.html < prev    next >
Text File  |  1989-07-12  |  5KB  |  136 lines

  1.  
  2. <H3><A ID="SECTION003511100000000000000"><tex2html_anchor_invisible_mark></A> <A ID="ch:actions"><tex2html_anchor_mark></A><BR>
  3. Actions
  4. </H3><#5004#>
  5.            
  6.       
  7.  
  8.  
  9. <P>
  10. An <#1378#><B>action</B><#1378#><A ID="1379"><tex2html_anchor_invisible_mark></A> is a function which is called to
  11. process an input event received by a contact instance. An action function
  12. accepts an argument list consisting of a contact instance and possibly
  13. additional arguments.<A ID="1380"><tex2html_anchor_invisible_mark></A>
  14. An action implements a response to
  15. the given <#1381#><TT>event</TT><#1381#> which is performed by all instances of a contact class.
  16. Actions are often generic functions with methods defined for
  17. specific contact classes.
  18. All responses of a CLUE application to its user input are occur via
  19. actions.  Typically, actions invoke contact callbacks<A ID="1382"><tex2html_anchor_invisible_mark></A> in
  20. order to report the results of user input back to the application.
  21.  
  22. <P>
  23. In general, an action represents a well-defined contact behavior that
  24. might be done in response to <#1383#><EM>any</EM><#1383#> event.  Contact programmers and
  25. users can cooperate in defining how user events are bound to contact
  26. actions (see Section~<A HREF=<tex2html_cr_mark>#ch:event-translation#1384><tex2html_cr_mark></A>). In some cases,
  27. however, an action may be designed to handle a very specific event type.
  28. The <#1385#><TT>with-event</TT><#1385#> macro can be used inside the body of an action in
  29. order to access slots of the <#1386#><TT>event</TT><#1386#> which caused the action to be
  30. called.
  31.  
  32. <P>
  33. <#4281#><FONT SIZE="+1"><#1387#><B>with-event Macro</B><#1387#></FONT><#4281#> 
  34. <A ID="1388"><tex2html_anchor_invisible_mark></A>
  35. <DIV class="RIGHT">
  36. <tex2html_image_mark>#tex2html_wrap_inline9936#
  37. </DIV>
  38.  
  39. <P>
  40. <DIV class="RIGHT">
  41. <tex2html_image_mark>#tex2html_wrap_inline9937#
  42. </DIV>
  43.  
  44. <P>
  45. The following actions are general utilities which are predefined by CLUE
  46. for the basic <#1414#><TT>contact</TT><#1414#> class.<A ID="1415"><tex2html_anchor_invisible_mark></A>
  47.  
  48. <P>
  49. <#4657#>
  50. <#4284#><FONT SIZE="+1"><#1416#><B>perform-callback Action, contact</B><#1416#></FONT><#4284#>
  51. <A ID="1417"><tex2html_anchor_invisible_mark></A>
  52. <A ID="1418"><tex2html_anchor_invisible_mark></A>
  53. <DIV class="RIGHT">
  54. <tex2html_image_mark>#tex2html_wrap_inline9938#
  55. </DIV><#4657#>
  56. <DIV class="RIGHT">
  57. <tex2html_image_mark>#tex2html_wrap_inline9941#
  58. </DIV>
  59.  
  60. <P>
  61. <#4658#>
  62. <#4287#><FONT SIZE="+1"><#1429#><B>describe-action Action, contact</B><#1429#></FONT><#4287#>
  63. <A ID="1430"><tex2html_anchor_invisible_mark></A>
  64. <A ID="1431"><tex2html_anchor_invisible_mark></A>
  65. <DIV class="RIGHT">
  66. <tex2html_image_mark>#tex2html_wrap_inline9942#
  67. </DIV><#4658#>
  68. <DIV class="RIGHT">
  69. <tex2html_image_mark>#tex2html_wrap_inline9945#
  70. </DIV>
  71.  
  72. <P>
  73. <#4659#>
  74. <#4290#><FONT SIZE="+1"><#1445#><B>eval-action Action, contact</B><#1445#></FONT><#4290#>
  75. <A ID="1446"><tex2html_anchor_invisible_mark></A>
  76. <A ID="1447"><tex2html_anchor_invisible_mark></A>
  77. <DIV class="RIGHT">
  78. <tex2html_image_mark>#tex2html_wrap_inline9946#
  79. </DIV><#4659#>
  80. <DIV class="RIGHT">
  81. <tex2html_image_mark>#tex2html_wrap_inline9949#
  82. </DIV>
  83.  
  84. <P>
  85. <#4660#>
  86. <#4293#><FONT SIZE="+1"><#1462#><B>apply-action Action, contact</B><#1462#></FONT><#4293#>
  87. <A ID="1463"><tex2html_anchor_invisible_mark></A>
  88. <A ID="1464"><tex2html_anchor_invisible_mark></A>
  89. <DIV class="RIGHT">
  90. <tex2html_image_mark>#tex2html_wrap_inline9950#
  91. </DIV><#4660#>
  92. <DIV class="RIGHT">
  93. <tex2html_image_mark>#tex2html_wrap_inline9953#
  94. </DIV>
  95.  
  96. <P>
  97. <#4661#>
  98. <#4296#><FONT SIZE="+1"><#1479#><B>throw-action Action, contact</B><#1479#></FONT><#4296#>
  99. <A ID="1480"><tex2html_anchor_invisible_mark></A>
  100. <A ID="1481"><tex2html_anchor_invisible_mark></A>
  101. <DIV class="RIGHT">
  102. <tex2html_image_mark>#tex2html_wrap_inline9954#
  103. </DIV><#4661#>
  104. <DIV class="RIGHT">
  105. <tex2html_image_mark>#tex2html_wrap_inline9957#
  106. </DIV>
  107.  
  108. <P>
  109. <#4662#>
  110. <#4299#><FONT SIZE="+1"><#1493#><B>trace-action Action, contact</B><#1493#></FONT><#4299#>
  111. <A ID="1494"><tex2html_anchor_invisible_mark></A>
  112. <A ID="1495"><tex2html_anchor_invisible_mark></A>
  113. <DIV class="RIGHT">
  114. <tex2html_image_mark>#tex2html_wrap_inline9958#
  115. </DIV><#4662#>
  116. <DIV class="RIGHT">
  117. <tex2html_image_mark>#tex2html_wrap_inline9961#
  118. </DIV>
  119.  
  120. <P>
  121. <#4663#>
  122. <#4302#><FONT SIZE="+1"><#1510#><B>ignore-action Action, contact</B><#1510#></FONT><#4302#>
  123. <A ID="1511"><tex2html_anchor_invisible_mark></A>
  124. <A ID="1512"><tex2html_anchor_invisible_mark></A>
  125. <DIV class="RIGHT">
  126. <tex2html_image_mark>#tex2html_wrap_inline9962#
  127. </DIV><#4663#>
  128.  
  129. <P>
  130. <DIV class="RIGHT">
  131. <tex2html_image_mark>#tex2html_wrap_inline9965#
  132. </DIV>
  133.  
  134. <P>
  135.  
  136.  =0 <#5014#>=0 <#5018#>